﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TA.Turbo.Controls
{
	/// <summary>
	/// Implements methods common to all simple controls.
	/// </summary>
	public static class SimpleControlCommon
	{
		/// <summary>
		/// Registers includes common to all simple controls.
		/// </summary>
		/// <param name="ctl"></param>
		public static void RegisterIncludes(ISimpleControl ctl, IncludeCollection includes)
		{
			includes.Add(Script.FieldBinding); // uncommented for now, until we figure out a solution to JS inclusion order
			includes.Add(Script.ServerEventSender);
			includes.Add(Script.EventDefinition);
			includes.Add(Script.String_EndsWith);
			includes.Add(new ScriptResourceInclude("TA.Turbo.Res.JS.Simple.SimpleControl.js", typeof(BaseCommandControl)));
		}
	}
}
